1. Field of the Invention
The present invention relates to an apparatus for processing a knock sensor signal and a design method of the same. More particularly, the present invention relates to a signal-processing apparatus for digitally processing an analog signal generated by a knock sensor for detecting a knocking.
2. Related Art
A knocking detection apparatus of an internal combustion engine is disclosed in documents such as Japanese Patent No. 2764495 (JP-A No. H5-248937).
In the apparatus disclosed in the document, an analog signal generated by a knock sensor is analyzed by being subjected to a wavelet conversion process in order to detect generation of a knocking. Thus, the analog signal generated by the knock sensor is subjected to an A/D conversion process in an A/D converter at a fixed sampling period, and time-axis data obtained as a result of the A/D conversion process is supplied to a frequency sampling filter to generate a processing result, which is then used as a basis for detecting generation of a knocking. The frequency sampling filter is a digital filter having an impulse response equal to the output of a predetermined basic wavelet function.
That is, in the implementation of a wavelet conversion process, a frequency F to serve as a processing object of a filter for determining whether or not a knocking exists by the wavelet conversion process is determined in advance, and a frequency sampling filter reacting to the frequency F, which is referred to as a filter frequency, is provided. A frequency sampling filter for wavelet conversion is designed so that, in general, the impulse response of the filter has a waveform H with a basic wavelet function""s frequency (or the so-called scale) matching the frequency F serving as an object of the filter. (That is, the waveform H is the waveform of a wavelet function having the F frequency). Thus, the output value of a frequency sampling filter designed in this way increases when the frequency of the input waveform Hin, which is the waveform of supplied time-axis data obtained as a result of an A/D conversion process, is equal to the frequency F serving as an processing object of the filter, and the input waveform Hin substantially exceeds the waveform H in the upward and downward directions. The more substantially the input waveform Hin exceeds the waveform H, the more the output value of the frequency sampling filter increases. The output value of the frequency sampling filter having such a characteristic is analyzed to determine whether or not a knocking exists.
By the way, in the apparatus disclosed in the document, the frequency sampling filter is designed to comprise a comb-type filter and a resonator to reduce the number of multiplications in the frequency sampling filter.
However, the document includes a statement saying: xe2x80x9cIf a wavelet conversion process is carried out using 50 wavelet functions with different scales, the number of multiplications is 750 per sample.xe2x80x9d Thus, in the sampling frequency filter disclosed in the document, for each sample, 15(=750/50) multiplications are required.
Assume for example that an attempt is made to carry out filter processing (strictly, digital filter processing) up to a maximum frequency of 14 kHz. In this case, it is necessary to set the sampling frequency (that is, the reciprocal of the sampling period) at a value at least equal to 28 kHz in accordance with the sampling theorem. As a matter of fact, it is desirable to set the sampling frequency at about 100 kHz in order to give a high degree of precision with which a knocking is detected. Then, let 3 frequencies including 14 kHz be each a processing object of the filter. In this case, if the frequency sampling filter disclosed in the document is used, for each period of 10 microseconds, which corresponds to a frequency of 100 kHz, 45 (=3xc3x9715) multiplications are required so that, the processing load becomes excessively large if an ordinary microcomputer is to be used for carrying out the filtering process, that is, if an ordinary microcomputer is to be used to function as a digital filter. For this reason, a special-purpose microcomputer such as a DSP is required.
It is thus an object of the present invention addressing the problems to reduce the filter processing load borne by a knock sensor signal processing apparatus used in a knocking detection system for detecting generation of a knocking by analyzing a signal generated by a knock sensor.
In accordance with a first aspect of the present invention, there is provided a knock sensor signal processing apparatus comprising:
an A/D converter for converting a knock-sensor signal generated by a knock sensor provided in an internal combustion engine from an analog signal into a digital signal in an A/D conversion process carried out at a fixed sampling period; and
a digital filter for sequentially inputting sampled data obtained as a result of the A/D conversion process carried out by the A/D converter and processing the sampled data.
The digital filter is an FIR (Finite Impulse Response) filter. In addition, filter coefficients h (k) of the digital filter are set in such a way that the filter coefficient h(m)=0 in case the sign of the filter coefficient h(mxe2x88x921) is different from the filter coefficient h(m+1) where k=0 to n and n is a positive integer.
In accordance with such a knock sensor signal processing apparatus, the filter load to process the knock signal can be reduced effectively.
That is, in general, an FIR filter includes a delay-unit group comprising a plurality of delay units connected to each other in series. The delay unit at the first stage receives pieces of sampled data sequentially with a present input piece of sampled data delayed from the immediately preceding input piece of sampled data by a sampling period. The subsequent delay units following the delay unit at the first stage receive pieces of sampled data from the immediately preceding delay units. The output of each delay unit in this group is multiplied by a coefficient h(k) referred to as a filter coefficient or a filter constant to produce a product. A sum of such products for the delay units, that is, a result of processing to sum up the weighted outputs of the delay units, is the output of the filter.
In an implementation of the knock sensor signal processing apparatus according to the first aspect of the present invention, if the sign of an (mxe2x88x921)th filter coefficient h(mxe2x88x921) is different from the sign of an (m+1)th filter coefficient, the mth filter coefficient h(m) between the (mxe2x88x921)th filter coefficient h(mxe2x88x921) and the (m+1)th filter coefficient h(m+1) is 0. Thus, the output of a delay unit corresponding to the mth filter coefficient h(m) of 0 does not have to be subjected to filter processing.
In other words, if the sign (or the polarity) of a filter coefficient of a digital filter changes, a zero point is deliberately used in order to reduce a computation load.
Concretely, in designing an FIR filter reacting to a processing-object frequency f of the filter, that is, in designing a FIR filter with a filter frequency f, the filter coefficients h(k) of the FIR filter are set at values equal to values of their respective mince points set on a predetermined reference waveform having a frequency equal to the filter frequency f by mincing the waveform starting from a start of the waveform at intervals each equal to a sampling period to provide a FIR filter having an output value, which increases when the frequency of the waveform representing pieces of time-axis data input sequentially matches the filter frequency f. In this case, zero-cross points of the reference waveform are used as some of the mince points. By doing so, the multiplicand filter coefficients for delay units corresponding to the mince points at the zero-cross points are zero so that, for the outputs of such delay units, no processing is required.
In such an implementation, the filter-processing load can be reduced to an amount that can be carried out by an ordinary microcomputer with ease.
In accordance with a second aspect of the present invention, there is provided a knock sensor signal processing apparatus employing an FIR filter wherein there are at least 4 filter coefficients having the same absolute value.
In such a knock sensor signal processing apparatus, the FIR filter needs to carry out filter processing by performing operations to multiply outputs generated by delay units corresponding to the 4 filter coefficients having the same absolute value by the filter coefficients after addition or subtraction operations of the outputs generated by the delay units.
Thus, the filter-processing load can be reduced effectively. It is to be noted that, in order to provide at least 4 filter coefficients having the same absolute value, it is necessary to create a reference waveform as a waveform having a left-right symmetrical shape, a left-right inverted symmetrical shape or a vertically or horizontally symmetrical shape. A reference waveform having a left-right inverted symmetrical shape is a waveform having at least one right-side period obtained as a result of inversion of a corresponding left-side period.
In accordance with a third aspect of the present invention, there is provided a knock sensor signal processing apparatus employing a digital filter wherein filter processing of outputs generated by delay units is carried out by merely performing shift operations and addition or subtraction operations.
In such a knock sensor signal processing apparatus, the filter processing does not include a multiplication operation imposing a relatively heavy processing load. Thus, the filter-processing load can be reduced to an amount that can be carried out by an ordinary microcomputer with ease.
In accordance with a fourth aspect of the present invention, there is provided a knock sensor signal processing apparatus comprising an A/D converter for carrying out an A/D conversion process on an analog signal generated by a knock sensor at a predetermined sampling period and a digital filter for sequentially inputting pieces of data obtained as a result of the A/D conversion process carried out by the A/D converter as well as processing the data, wherein the filter frequency f of the digital filter is changed when the sampling frequency is changed. It is to be noted that changing the sampling period T is equivalent to changing the sampling frequency (1/T), which is the reciprocal of the sampling period T.
In accordance with the above knock sensor signal processing apparatus, a digital filter designed to reduce a processing load at a filter frequency f1 can be used as it is to reduce a processing load at a filter frequency f2 different from the filter frequency f1. In addition, if the filter frequency is changed, it is necessary to change only the sampling period but not the design of the digital filter.
In accordance with a fifth aspect of the present invention, there is provided a method of designing a knock sensor signal processing apparatus comprising an A/D converter for carrying out an A/D conversion process on an analog signal generated by a knock sensor at a predetermined sampling period and a plurality of digital filters each used for sequentially inputting pieces of data obtained as a result of the A/D conversion process carried out by the A/D converter as well as processing the data and each provided for one of the same plurality of filter frequencies.
As each of the digital filters, a FIR filter is used. In addition, a sampling frequency, which is the reciprocal of the sampling period of the A/D converter, is set at a common multiple of the filter frequencies, or the sampling period is set at a common divisor of periods of time, which are each the reciprocal of one of the filter frequencies.
It is possible to effectively reduce the filter-processing load borne by the knock sensor signal processing apparatus employing the digital filters with filter frequencies different from each other. The filter-processing load is reduced as follows:
(1): First of all, for a specific one of the digital filters, the sampling frequency is set at a multiple of the filter frequency of this specific digital filter. If this specific digital filter is designed as described concretely in the explanation of the first aspect of the present invention, it is easy to produce a plurality of mince points having the same absolute value. As a result, a plurality of filter coefficients having the same absolute value can also be provided with ease as well. Thus, the specific digital filter needs to carry out filter processing by performing an operation to multiply the outputs of the delay units corresponding to the filter coefficients having the same absolute value by the filter coefficients only once after addition or subtraction operations of the outputs generated by the delay units. For this reason, by providing a number of filter coefficients having the same absolute value, the filter-processing load can be reduced.
(2): By setting a sampling frequency, which is the reciprocal of the sampling period, at a common multiple of the filter frequencies, or by setting the sampling period at a common divisor of periods of time, which are each the reciprocal of one of the filter frequencies, the sampling frequency has a value equal to a multiple of the different filter frequencies of all the digital filters. As a result, it is possible to obtain the same effect as that described in section (1).
It is thus possible to effectively reduce the filter-processing load borne by the digital filters having filter frequencies different from each other.
In accordance with a sixth aspect of the present invention, there is provided an implementation of the method of designing a knock sensor signal processing apparatus in accordance with the aforementioned fifth aspect of the present invention, wherein the sampling frequency is set at an even multiple of a least common multiple of the filter frequencies, or the sampling period is set at an even fraction a greatest common measure of periods of time, which are each the reciprocal of one of the filter frequencies.
Thus, the sampling frequency is equal to an even multiple of all the filter frequencies. Accordingly, for all the digital filters, the number of zero-cross points on the reference waveform can be increased. The zero-cross points are each located in every half period within the reference waveform. It is therefore possible to decrease the number of delay units whose outputs are not subjected to processing, that is, the number of delay units whose outputs are not used. As a result, the filter-processing load can be further reduced.
If a specific one fb of the filter frequencies is equal to 1/n of a particular one fa of the filter frequencies where n is a positive integer, it is desirable to design one of the digital filters that has a filter frequency equal to the specific filter frequency fb, which is equal to 1/n of the particular filter frequency fa, as an FIR filter by replacing each delay unit employed in one of the digital filters that has a filter frequency equal to the particular filter frequency fa with n delay units connected to each other in series. Thus, the number of delay units employed in the digital filter having a filter frequency equal to the specific filter frequency fb is n times the number of delay units employed in the digital filter having a filter frequency equal to the particular filter frequency fa. However, the outputs of the delay units employed in the digital filter having a filter frequency equal to the specific filter frequency fb are thinned, that is, only 1 of every n outputs is subjected to filter processing.
By providing such a configuration, the work to design a plurality of digital filters can be carried out with ease. In addition, it is possible to reduce the number of times the computation is carried out in the digital filter having a filter frequency equal to the specific filter frequency fb.